<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'modify.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<link type="text/css" rel="stylesheet" href="css/style.css" />

<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
	$(function(){
		$.ajax({
			url:"find.action",
			type:"POST",
			success:function(data){
				var proList = data.proList;
				var goodsList = data.goodsList;
				for(var i=0;i<proList.length;i++){
					$("#provider").append("<option value="+proList[i].proId+">"+proList[i].proName+"</option>");
				}
				for(var i=0;i<goodsList.length;i++){
					$("#goods").append("<option value="+goodsList[i].goodsId+">"+goodsList[i].goodsName+"</option>");
				}
				
			}
		});
	
	});

</script>
  </head>
  
<body>

<div class="main">
	<div class="optitle clearfix">
		
		<div class="title">账单管理&gt;&gt;</div>
	</div>
	<form method="post" action="addBill.action">
		<div class="content">
			<table class="box">
				<tr>
					<td class="field">商品名称：</td>
					<td>
						<select id="goods" name="goodsId">
							<option value="">----请选择----</option>
						</select>
						
					</td>
				</tr>
				<tr>
					<td class="field">交易金额：</td>
					<td><input type="text" name="deal" class="text" /></td>
				</tr>
				<tr>
					<td class="field">交易数量：</td>
					<td><input type="text" name="count" class="text" /></td>
				</tr>
				
				<tr>
					<td class="field">商品描述：</td>
					<td><textarea name="description"></textarea></td>
				</tr>
				
				<tr>
					<td class="field">所属供应商：</td>
					<td>
						<select id="provider" name="proId">
							<option value="">----请选择----</option>
							
						</select>
					</td>
				</tr>
				<tr>
					<td class="field">是否付款：</td>
					<td><select name="payMent">
						<option value="1">是</option>
						<option value="0">否</option>
					</select></td>
				</tr>
			</table>
		</div>
		<div class="buttons">
			<input type="submit" name="submit" value="确认" class="input-button" />
			<input type="button" name="button" value="返回" class="input-button" onclick="history.back()" />
		</div>
	</form>
</div>
</body>
</html>
